@import 'restyle';

$pad-width: 16px;

@include restyle-define(
  filter-card,
  (
    restyle-var(horizontal-padding): $pad-width,
    background-color: set-color(white, base),
    padding: restyle-var(horizontal-padding),
    position: relative,
    border-bottom: 1px solid set-color(grey, light)
  )
);

@include restyle-define(filter-rail, (list-style-type: none, padding: 0, border: 1px solid set-color(grey, light)));

.nacho-filter-rail {
  @include restyle(filter-rail);

  &__loading {
    $loading-container-height: 150px;
    height: $loading-container-height;
  }

  &__header {
    color: set-color(blue, oxford);
    background-color: set-color(white, base);
    padding: $pad-width;
    font-size: 17px;
    font-weight: 600;
  }
}

.nacho-filter-card {
  @include restyle(filter-card);
  max-height: 625px;
  overflow-y: scroll;
  overflow-x: hidden;

  &:last-child {
    border-bottom: none;
  }

  &__label,
  .ember-radio-button {
    display: block;
  }

  &__header {
    padding: 0 0 $pad-width/2;
  }

  /// Node link is a filter rail component that navigates to mode details about the
  ///   selected node
  &__node-link {
    display: block;
    margin: 2px 0;
    margin-left: -$pad-width;
    margin-right: -$pad-width;
    padding: $pad-width/2 $pad-width $pad-width/2 $pad-width/2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    &::before {
      content: '+';
      color: set-color(grey, mid);
      padding: 0 10px 0 10px;
    }
  }

  &__node-link + &__node-link {
    border-top: 1px solid set-color(gray, light);
  }
}
